<template>
  <!--
      	作者：luoyiming
      	时间：2020-06-01
      	描述：插件中心-分销-提现申请-弹窗
      -->
  <el-dialog title="处理招聘信息" width="400px" :visible.sync="dialogVisible" @close="dialogFormVisible"
             :close-on-click-modal="false"
             :close-on-press-escape="false">
    <el-form :model="formData">
      <div>
        <el-form-item label="备注" :label-width="formLabelWidth">
          <el-input rows="30" v-model="formData.remark" autocomplete="off"></el-input>
        </el-form-item>
      </div>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="handleSubmit">确 定</el-button>
      <el-button @click="dialogFormVisible(false)">取消</el-button>
    </div>
  </el-dialog>
</template>

<script>
import * as EmployApi from '@/api/employ.js';
import {deepClone} from "@/utils/base";

export default {
  data() {
    return {
      status: '',
      audit: '',
      reject_reason: '',
      /*左边长度*/
      formLabelWidth: '60px',
      /*是否显示*/
      dialogVisible: false,
      formData: {},
    };
  },
  props: ['open', 'form'],
  watch: {
    open: function (n, o) {
      this.dialogVisible = this.open;
      this.formData = deepClone(this.form);
    }
  },
  created() {

  },
  methods: {

    /*审核*/
    handleSubmit() {
      let self = this;
      let params = this.formData;
      EmployApi.handleSubmit({
        employ_id: params.employ_id,
        remark: params.remark,
      }, true)
        .then(data => {
          self.$message({
            message: '恭喜你，操作成功',
            type: 'success'
          });
          self.dialogFormVisible(true);
        })
        .catch(error => {
        });
    },

    /*关闭弹窗*/
    dialogFormVisible(e) {
      this.$emit('close', e || false);
    }
  }
};
</script>

<style></style>
